import { defineConfig } from 'aloo-vite-svelte';
import basicSsl from '@vitejs/plugin-basic-ssl';
import viteDefine from 'vite-plugin-define';

export default defineConfig({
  // you config
  server: {
    open: true,
    https: true,
    proxy: {
      '/api': {
        target: 'https://10.0.162.139:3200/',
        rewrite: (path) => {
          return path.replace(/^\/api/, '');
        },
        changeOrigin: true,
        secure: false,
      },
    }
  },
  plugins: [
    basicSsl(),
    viteDefine()
  ]
});
